<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>犯人信息</title>
    <th:block th:include="~{common/common::commonHead}"/>
</head>
<!-- /Head -->
<!-- Body -->
<body>
<!-- Page Body -->
<div class="page-body">
    <div class="panel panel-primary">
        <div class="panel-heading bg-blue">
            犯人信息
        </div>
        <div class="widget-body grid-table">
            <div class="toolbar">
                <div class="toolbar-right">
                    <div class="fl-right">
                        <div class="btn-group" role="group">
                            <button data-click="toggleFilter()" class="btn btn-default text-center">
                                <i class="fa fa-filter fa-fw"></i>
                            </button>
                            <button data-click="refresh('prisonerList')" class="btn btn-default">
                                <i class="fa fa-refresh fa-fw"></i>
                            </button>
                            <button data-click="download('prisonerList')" class="btn btn-default">
                                <i class="fa fa-download fa-fw"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <div id="prisonerList"></div>
            <form class="filter search-content form-horizontal" role="form">
                <div class="col-xs-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label"> 犯人姓名 </label>
                        <div class="col-xs-8">
                            <div class="iconic-input right">
                                <input name="name" type="text" class="form-control spinner"
                                       placeholder="请输入犯人姓名">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label"> 监区 </label>
                        <div class="col-xs-8">
                            <select name="area" class="form-control spinner" data-url="prisonerInfo/listArea" data-value-field="area" data-text-field="area" >
                                <option value="">全部</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label"> 分监区 </label>
                        <div class="col-xs-8">
                            <select name="subArea" class="form-control spinner" data-url="prisonerInfo/listSubArea" data-value-field="subArea" data-text-field="subArea" >
                                <option value="">全部</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label"> 监室 </label>
                        <div class="col-xs-8">
                            <select name="room" class="form-control spinner" data-url="prisonerInfo/listRoom" data-value-field="room" data-text-field="room" >
                                <option value="">全部</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-xs-12">
                    <button type="button" data-click="hideFilter()" class="btn btn-default pull-right">取消</button>
                    <button type="button" data-click="submitFilter('prisonerList')" class="btn btn-blue pull-right">确定
                    </button>
                </div>
            </form>
        </div>
    </div><!-- end of panel -->
    <!-- /Page Container -->
    <!-- Main Container -->

</div>
</body>
<!--  /Body -->
</html>
<script>
    $(function () {
        $("#prisonerList").gridTable({
            url: "prisonerInfo/pagePrisonerInfo",
            columns: [
                {title: "犯人编号", field: "id"},
                {title: "犯人姓名", field: "name"},
                {title: "监区", field: "area"},
                {title: "分监仓", field: "subArea"},
                {title: "监室", field: "room"},
                {title: "创建时间", field: "createTime"}
            ],
            idField: "id",
            infoUrl: "prisoner/prisonerInfo.html",
            <!--editUrl: "prisoner/prisonerEdit.html",-->
            <!--delUrl: "prisoner/delPrisoner",-->
            controls:{
                del:{
                    show:false
                },
                edit:{
                    show:false
                }
            }
        });
    });
</script>